<%--
  Created by IntelliJ IDEA.
  User: GL62
  Date: 2019/10/18
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1 align="center">微博首页</h1>
<table border="1" align="center">
    <c:forEach items="${bloglist}" var="b">
    <tr>
        <td>${b.content}</td>
        <td>${b.publishtime}</td>
        <td><a href="/deleteblog.do?id=${b.id}&userid=${b.userid}">删除</a></td>
    </tr>
    </c:forEach>
    <tr>
        <td colspan="5" align="center">
            <span>共${info.total}条记录</span>
            <a href="/blogquery.do?pageIndex=${info.firstPage}&userid=${user.id}">首页</a>
            <c:if test="${info.hasPreviousPage}">
                <a href="/blogquery.do?pageIndex=${info.prePage}&userid=${user.id}">上一页</a>
            </c:if>
            <c:if test="${info.hasNextPage}">
                <a href="/blogquery.do?pageIndex=${info.nextPage}&userid=${user.id}">下一页</a>
            </c:if>
            <a href="/blogquery.do?pageIndex=${info.lastPage}&userid=${user.id}">末页</a>
            <span>第${info.pageNum}/${info.pages}页</span>
        </td>
    </tr>
    <tr>
        <td align="center"><button><a href="jsp/addblog.jsp?userid=${user.id}">发布微博</a></button></td>
    </tr>
</table>
</body>
</html>
